package com.dodayum.java8.leecode;

import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        int[] num = new int[]{3,3};
        int target = 9;
        int[] query = query(num, target);
        for (int i : query) {
            System.out.println(i);
        }
    }

    public static int[] query(int[] num,int target){
        int[] response = new int[2];

        for (int i = 0; i < num.length; i++) {
            for (int i1 = i+1; i1 < num.length; i1++) {
                if(num[i] + num[i1] == target){
                    response[0] = i;
                    response[1]=i1;
                }
            }
        }

        return response;
    }

}
